﻿namespace Hidistro.UI.Web.Admin
{
    using Hidistro.ControlPanel.Store;
    using Hidistro.Membership.Context;
    using Hidistro.UI.Common.Controls;
    using Hidistro.UI.ControlPanel.utility;
    using Hidistro.UI.Web;
    using System;
    using System.Web.UI.HtmlControls;

    public class BFDTotal : AdminPage
    {
        protected HtmlForm form1;
        protected HeadContainer HeadContainer1;
        protected PageTitle PageTitle1;

        [AdministerCheck(true)]
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = "123456";
            SiteSettings siteSettings = HiContext.Current.SiteSettings;
            if (!string.IsNullOrEmpty(siteSettings.BFDUserName) && siteSettings.EnabledBFD)
            {
                string str2 = APIHelper.Sign("code=hishop&username=" + siteSettings.BFDUserName + "&mkey=" + str, "md5", "utf-8");
                string url = "http://passport.baifendian.com/baeweb/main.html?code=hishop&username=" + siteSettings.BFDUserName + "&sign=" + str2;
                base.Response.Redirect(url);
            }
            else
            {
                this.Page.Response.Redirect("BFDset.aspx");
            }
        }
    }
}

